<html>
<head><meta charset="utf-8"><title>does docs.rs support -Zbuild-std? · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html">does docs.rs support -Zbuild-std?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="233243238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233243238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233243238">(Apr 05 2021 at 23:04)</a>:</h4>
<p>I've got a project for <code>thumbv4t-none-eabi</code> (tier3), and in the <code>.cargo/config.toml</code> it's set up so that a normal "cargo build" will use the correct target and also cargo's build-std ability.</p>
<p>Would that work with <a href="http://docs.rs">docs.rs</a>? Like would rust-src be installed, and does it build the docs by invoking cargo instead of calling rustdoc directly?</p>



<a name="233243366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233243366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233243366">(Apr 05 2021 at 23:06)</a>:</h4>
<p>I don't think <a href="http://docs.rs">docs.rs</a> lets you pass cargo flags currently, but it could. <code>.cargo/config</code> won't work, we started removing it because too many people had <code>target = </code> without putting in <a href="http://package.metadata.docs.rs">package.metadata.docs.rs</a> and it meant the default build failed</p>



<a name="233243447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233243447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233243447">(Apr 05 2021 at 23:07)</a>:</h4>
<p>yeah, looks like it's not on the list: <a href="https://docs.rs/about/metadata">https://docs.rs/about/metadata</a> but it should be an easy patch to <a href="https://github.com/rust-lang/docs.rs/blob/master/crates/metadata/">https://github.com/rust-lang/docs.rs/blob/master/crates/metadata/</a> if you want to take a stab. You won't even have to compile all the dependencies since it's a separate crate :)</p>



<a name="233243766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233243766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233243766">(Apr 05 2021 at 23:10)</a>:</h4>
<p>I don't know if rust-src works, you could test it locally. I'd be willing to add it if it's not there yet though, it's not that big</p>



<a name="233244354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233244354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233244354">(Apr 05 2021 at 23:18)</a>:</h4>
<p>i don't know how i'd test locally that rust-src is installed in the <a href="http://docs.rs">docs.rs</a> runner</p>



<a name="233244377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233244377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233244377">(Apr 05 2021 at 23:19)</a>:</h4>
<p>it's just a rustup component, i know it's installed for me</p>



<a name="233244380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233244380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233244380">(Apr 05 2021 at 23:19)</a>:</h4>
<p><a href="https://forge.rust-lang.org/docs-rs/add-dependencies.html#testing-the-image">https://forge.rust-lang.org/docs-rs/add-dependencies.html#testing-the-image</a></p>



<a name="233244392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233244392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233244392">(Apr 05 2021 at 23:19)</a>:</h4>
<p>josh you're gonna be the end of me</p>



<a name="233244393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233244393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233244393">(Apr 05 2021 at 23:19)</a>:</h4>
<p>(that will require all the dependencies unfortunately)</p>



<a name="233244483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233244483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233244483">(Apr 05 2021 at 23:20)</a>:</h4>
<p>hmm actually I think we might have the docker image prebuilt somewhere</p>



<a name="233244484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233244484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233244484">(Apr 05 2021 at 23:20)</a>:</h4>
<p>isn't there just a list of what rustup components are installed in the image?</p>



<a name="233244501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233244501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233244501">(Apr 05 2021 at 23:20)</a>:</h4>
<p>rust is not in the image itself, it's on the host</p>



<a name="233244510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233244510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233244510">(Apr 05 2021 at 23:20)</a>:</h4>
<p>oh</p>



<a name="233244517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233244517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233244517">(Apr 05 2021 at 23:20)</a>:</h4>
<p>the image is shared between <a href="http://docs.rs">docs.rs</a> and crater</p>



<a name="233244571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233244571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233244571">(Apr 05 2021 at 23:21)</a>:</h4>
<p>ok yes if you can find where this goes there's a prebuilt image <a href="https://github.com/rust-lang/docs.rs/runs/2264420004#step:4:1">https://github.com/rust-lang/docs.rs/runs/2264420004#step:4:1</a></p>



<a name="233244575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233244575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233244575">(Apr 05 2021 at 23:21)</a>:</h4>
<p>alright i'll just set a tier2 target that's close enough</p>



<a name="233245052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233245052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233245052">(Apr 05 2021 at 23:28)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> can i maybe just tell <a href="http://docs.rs">docs.rs</a> the exact command to run to build my crate's docs?</p>



<a name="233245060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233245060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233245060">(Apr 05 2021 at 23:28)</a>:</h4>
<p>not currently, no</p>



<a name="233245061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/does%20docs.rs%20support%20-Zbuild-std%3F/near/233245061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/does.20docs.2Ers.20support.20-Zbuild-std.3F.html#233245061">(Apr 05 2021 at 23:28)</a>:</h4>
<p>poo</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>